The present application is related to audio spectrum analyzers. More specifically, the present application is related to system and method for an audio spectrum analyzer.
A spectrum analyzer is an instrument for measuring the amplitudes of the components of a complex waveform throughout the frequency range of the waveform. Audio spectrum analyzers are used for analysis of audio waveforms or signals over a specified frequency range. Typically, this frequency range is 20 Hz to 20 kHz, which is the range of audible signals. Generally, audio spectrum analyzers output or display a graph of the frequency content of an audio signal. For example, the output of an audio spectrum analyzer may be a standard X-Y spectrum plotting amplitude versus frequency or a 3-D wireframe that plots amplitude, time and frequency. Audio spectrum analyzers may be used for a variety of purposes, such as conducting sound level measurements for a given environment, measuring the performance of a musical instrument or loudspeaker system, and measuring the frequency response of an audio device such as a tape recorder.
Spectrum analyzers generally fall into two categories: swept spectrum analyzers and Fast Fourier Transform (FFT) based spectrum analyzers. Swept spectrum analyzers utilize one or more band pass filters in combination with a tunable mixer to measure the signal amplitude at a given frequency. By sweeping or changing the center frequency received, one may develop a plot of amplitude versus frequency for the signal. While swept spectrum analyzers are suitable for high frequency analysis, swept spectrum analyzers are not ideal for audio spectrum analysis because they are only capable of detecting continuous wave signals. As a result, FFT based spectrum analyzers are generally used for the analysis of audio signals.
A computer system or digital signal processor (DSP) utilizing the FFT typically digitizes the signal under analysis using an analog-to-digital (A/D) converter. The resulting digital signal is a set of digital values corresponding to the points sampled from the audio signal. The stored digital values are subsequently processed using the FFT algorithm. This method allows for the capture and analysis of short duration events. For example, FFT based audio spectrum analyzers may capture the spectrum of a single drum beat.
FFT based audio spectrum analyzers utilize Fourier transforms to analyze audio signals. The Fourier transform is based on the principal that any signal or waveform can be represented as a combination of sine waves of various frequencies. The Fourier transform involves splitting or decomposing a signal into these component frequencies or sine waves. Thus, any periodic function of time x(t) may be resolved into an equivalent infinite summation of sine waves and cosine waves with frequencies that start at zero and increase in integer multiples of a base frequency ƒ0=1/T, where T is the period of x(t). Accordingly, the periodic function x(t) may be expressed as a Fourier series:       x    ⁡          (      t      )        =            a      0        +                  ∑                  k          =          1                ∞            ⁢              xe2x80x83            ⁢              (                                            a              k                        ⁢                          xe2x80x83                        ⁢                          cos              ⁡                              (                                  2                  ⁢                                      xe2x80x83                                    ⁢                  π                  ⁢                                      xe2x80x83                                    ⁢                                      kf                    0                                    ⁢                  t                                )                                              +                                    b              k                        ⁢                          sin              ⁡                              (                                  2                  ⁢                                      xe2x80x83                                    ⁢                  π                  ⁢                                      xe2x80x83                                    ⁢                                      kf                    0                                    ⁢                  t                                )                                                    )            
The Fourier transform determines the values for the ak and bk coefficients necessary to produce a Fourier series and thereby translates a function in the time domain into a function in the frequency domain. As a result, the Fourier transform allows one to analyze a signal in the time domain for its frequency content because the Fourier coefficients of the transformed function correspond to the contribution of each sine and cosine function at each frequency.
However, computer systems cannot perform infinite summations and can only work with discrete data. Therefore, numerical computation of the Fourier transform of x(t) requires discrete sample values. The discrete Fourier transform (DFT) estimates the Fourier transform of a function from a finite number of sampled points. The sampled points are representative of the signal at all other times. Thus, the DFT computes a discrete numerical equivalent of the Fourier transform using sums instead of integrals. However, to approximate the function by samples, and to approximate the Fourier integral by the DFT, require applying a matrix whose order is the number of sample points n. As a result, the number of computations required to approximate the function and the Fourier integral is n2 arithmetic operations. Thus, the number of computations required may become increasingly unmanageable as the number of samples increase. The FFT is an optimized DFT algorithm that reduces the number of computations from n2 to n log n arithmetic operations. Computer systems utilizing the FFT can therefore incorporate more samples. The accuracy of the approximation increases with the number of sample points. Thus, the FFT is a popular algorithm for several applications, including audio spectrum analyzers.
As discussed above, computer systems or microcontrollers utilize the DFT and the FFT in order to approximate the Fourier transforms of time domain signals. The DFT and the FFT allow the computer system to approximate the Fourier transform from a discrete number of samples. However, both of these algorithms require the extensive use of the multiplication function because the DFT and the FFT involve a lot of multiplying and then accumulating the result. As discussed above, the DFT requires multiplying an nxc3x97n matrix by a vector, which requires n2 arithmetic operations. While the FFT reduces the number of arithmetic operations required to approximate the Fourier transform, the FFT still requires the use of the multiply function. Therefore, the DFT and the FFT algorithms both require processors that can perform multiplication and additions in parallel. A microcontroller or processor requires additional hardware in order to perform the multiply function. As a result, simple processors without the hardware to perform multiplication operations cannot utilize the DFT or FFT and accordingly, cannot be used to implement an audio spectrum analyzer.
Furthermore, in order for a processor to perform either the DFT or the FFT, the processor must frame the data. The process of data framing involves acquiring a block of samples before any of the samples are processed. Thus, the processor must acquire a block of samples from the signal before it processes any of the samples. Accordingly, all the samples in the frame must be stored in memory before any of the samples are processed. As a result, valuable memory resources must be allocated to storing all of the samples in the frame.
The invention overcomes the above-identified problems as well as other shortcomings and deficiencies of existing technologies by providing a spectrum analyzer with a minimum number of multipliers. Therefore a spectrum analyzer according to the present invention may be implemented using a simple microcontroller that does not need a hardware multiply function.
Accordingly, an exemplary embodiment of the present invention performs a spectral analysis of an input signal comprising the steps of:
sampling the input signal four times a first frequency f1; calculating the Spectral Energy at at least one frequency bin Fn, whereby Fn equals 1/(4n)f1 and n being an integer greater than =1.
Another frequency bin is added by sampling at 4 times the first frequency. A low pass filter is used to eliminate the effect of aliasing on the other frequency bins and to compensate the effect of the sampling at 2xc3x97f1.
Another exemplary embodiment produces a frequency spectrum analysis for an input signal comprises the steps of:
low pass filtering the input signal, whereby an attenuation of the input signal at a frequency f1 is achieved;
sampling the input signal eight times of the first frequency f1/2;
calculating the spectral energy at f1 for a first bin F1;
discarding every other sample and calculating the spectral energy at at least one frequency bin Fn, whereby Fn equals 1/(4(nxe2x88x921))f1 and n being an integer greater than =2.
Yet another exemplary embodiment provides a digital audio spectrum analyzer for analyzing an analog input signal which comprises:
a low pass filter receiving the analog input signal and attenuating the input signal at a frequency f1 and generating an output signal;
an analog-to-digital-converter receiving the output signal of the low pass filter and sampling a frequency f2=f1/2 at 8-times the frequency f1;
a sampling reducer generating a signal which is sampled at 4 times the frequency f1 coupled with the analog-to-digital-converter;
a first spectral energy calculation unit receiving the signal sampled at 4 times the frequency f1;
a second spectral energy calculation unit receiving the signal sampled at 8-times the frequency f1.
Other and further objects, features and advantages will be apparent from the following description of presently preferred embodiments of the invention, given for the purpose of disclosure and taken in conjunction with the accompanying drawings.